package Game;

class Doctor extends GameRole{

    public Doctor(String name){
        this.setName(name);
        this.setRank(1);
        this.setHp(8);   //体力
        this.setMaxHp(this.getHp());
        this.setAp(1);   //攻击力
        this.setDp(2);  //防御力
        this.setMoney(12);
    }

    public Doctor(String name,int rank){
        this.setName(name);
        this.setRank(rank);
        this.setHp(8 * rank);   //体力
        this.setMaxHp(this.getHp());
        this.setAp(rank);   //攻击力
        this.setDp(2*rank);  //防御力
        this.setMoney(12);
    }

    @Override
    public void attack(GameRole role) {
        if (this.getHp()>10) {
            System.out.println("攻击成功,体力值减10");
            this.setHp(getHp() - 10);
            role.setHp(0);
        }else {
            System.out.println("体力值不足，无法攻击");
        }
    }

    @Override
    public void introduce() {
        System.out.println("角色名称：" + this.getName() + "  等级：" + this.getRank() + "  体力：" + this.getHp() + "/" + this.getMaxHp()
                + "  攻击力：" + this.getAp() + "  防御力：" + this.getDp() + "  " + "  金币：" + this.getMoney());
    }

    public void cure(GameRole role){
        ///////////////////////
    }

}
